name_proto = name_proto or createprototype({
  name = "", 
})

data_proto = data_proto or createprototype({
  data = {}, --Place to store generic data at a point
})

timer_proto = timer_proto or createprototype({
  frequency   = 1,   -->One second
  status      = status.paused,
})

moveable_proto = moveable_proto or createprototype({
  speed = 1.0,
  direction = vector3(0,0,0), --normalized vector
  facing    = vector3(0,0,0), --relative to direction
})

--Points in space
point_proto = point_proto or createprototype({
  position = vector3(0,0,0), 
})

namedpoint_proto = namedpoint_proto or createprototype(point_proto,name_proto)

smartpoint_proto = smartpoint_proto or createprototype(namedpoint_proto,data_proto)

--Colections of points
pointcollection_proto = pointcollection_proto or createprototype(name_proto,{
  points = list.new(), --List to hold points in order
})

--Paths
path_proto = path_proto or createprototype(pointcollection_proto,{
  closed = false, --The path loops
  curve  = curves.linear,
})

pathfollower_proto = pathfollower_proto or createprototype(smartpoint_proto,moveable_proto,{
  path  = none,
})

--Object in space
pathfollower_proto = pathfollower_proto or createprototype(point_proto,{
  shape     = "",  --Used for collisions and such
  rotation = vector3(0,0,0), 
  scale = vector3(1,1,1)
})

smartobject_proto = smartobject_proto or createprototype(object_proto,name_proto,data_proto)

--Regions
region_proto = region_proto or createprototype(smartobject_proto,{})

trigger_proto = trigger_proto or createprototype(region_proto,timer_proto,{
  onenter     = off,
  onleave     = off,
  onreside    = off,
  onappear    = off,
  ondisappear = off,
})

--Visible objects in space
visible_proto = visible_proto or createprototype(object_proto,{
  display = {}, --Data that holds the visual representation of the object
  color   = rgba.new(1,1,1,1),
})


conflict = pcall(createprototype,object_proto,visible_proto)
printd("tried to make a conflicting prototype, this should be false\t:",conflict)
